package com.ls.fw.hadoop.client;

import java.io.IOException;
import java.util.List;

import com.ls.fw.hadoop.client.base.BaseHadoopDao;
import com.ls.fw.hadoop.client.base.impl.BaseHadoopDaoImpl;
import com.ls.fw.hadoop.client.constant.StatusType;

public class Test {

	static{
		System.setProperty("HADOOP_HOME", "C:\\hadoop-2.2.0\\hadoop-2.2.0");
		System.setProperty("hadoop.home.dir", "C:\\hadoop-2.2.0\\hadoop-2.2.0");
    }
	public static void main(String[] args) throws IOException {
		String url = "hdfs://192.168.0.182:9000";
		BaseHadoopDao  dao = new BaseHadoopDaoImpl(url);
		List<?> list = dao.getRootDirectory();
		for (Object object : list) {
			System.out.println(object);
		}
		System.out.println(dao.getNamenodeList());
		System.out.println(dao.getDatanodeList(StatusType.all));
	}
}
